package com.rickpan.dto.contacts;

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

/**
 * 处理好友申请请求DTO
 */
public class HandleFriendRequestRequest {

    @NotNull(message = "操作类型不能为空")
    private Action action;

    @Size(max = 200, message = "回复消息长度不能超过200个字符")
    private String responseMessage;

    // 操作类型枚举
    public enum Action {
        ACCEPT,     // 接受
        REJECT      // 拒绝
    }

    // 构造函数
    public HandleFriendRequestRequest() {}

    public HandleFriendRequestRequest(Action action) {
        this.action = action;
    }

    public HandleFriendRequestRequest(Action action, String responseMessage) {
        this.action = action;
        this.responseMessage = responseMessage;
    }

    // Getter和Setter方法
    public Action getAction() {
        return action;
    }

    public void setAction(Action action) {
        this.action = action;
    }

    public String getResponseMessage() {
        return responseMessage;
    }

    public void setResponseMessage(String responseMessage) {
        this.responseMessage = responseMessage;
    }

    @Override
    public String toString() {
        return "HandleFriendRequestRequest{" +
                "action=" + action +
                ", responseMessage='" + responseMessage + '\'' +
                '}';
    }
}
